Example Report Assets Section

knitr::opts_chunk$set( echo =T, message=F, warning=F )
# LOAD PACKAGES
library( dplyr )
library( pander )
library( knitr )
library( gender )

# SOURCE CUSTOM FUNCTIONS
source( "utils.R" )
# LOAD DATA
URL <- "https://raw.githubusercontent.com/Watts-College/paf-514-template/main/labs/batch-demo/asu-salaries-2020.csv"
d <- read.csv( URL )

# DATA STEPS 

d$first.name <- get_first_name( d$Full.Name )
d <- add_gender( d )
d <- add_titles( d )
d <- fix_salary( d )

d <-      # report sample
  d %>% 
  filter( title != "" & ! is.na(title) ) %>% 
  filter( Department.Description %in% academic.units )



Salary Range by Rank and Gender

# {r, results="asis", fig.height=7, fig.width=10}
for( i in academic.units )
{
  
  d2 <- filter( d, Department.Description == i )
  if( nrow(d2) == 0 ) { next } 
  # create the salary summary by rank & gender table
  create_salaries_table()
  # create the top 5 salaries table 
  t.rank <-
    top_5_highest_paid(d2)
  # build the graph 
  t.salary <- 
  d2 %>% 
  group_by( title, gender ) %>% 
  summarize( q25=quantile(salary,0.25),
             q50=quantile(salary,0.50),
             q75=quantile(salary,0.75),
             n=n() ) %>% 
  ungroup() %>% 
  mutate( p= round( n/sum(n), 2) )

t.salary %>% build_graph( unit = i)


t.salary$q25 <- dollarize( t.salary$q25 )
t.salary$q50 <- dollarize( t.salary$q50 )
t.salary$q75 <- dollarize( t.salary$q75 )

t.salary %>% knitr::kable(format="html")
 
   # print the tables:  
  cat( paste('<h3>',"TOP FIVE SALARIES",'</h3>' ) )
  cat( t.rank %>% knitr::kable(format="html") )   

  cat( '<br><hr><br>' )
  
}

TOP FIVE SALARIES

Full.Name title gender salary
Rhodes, Jewell Full Professor female $297,000
Simpson, Brooks Full Professor male $145,610
Maid, Barry Full Professor male $108,100
Brumberger, Eva Full Professor female $106,350
Moulton, Ian Full Professor male $100,000



TOP FIVE SALARIES

Full.Name title gender salary
Sagers, Cynthia Full Professor female $123,750
Zandieh, Michelle Full Professor female $113,288
Shovkovy, Igor Full Professor male $107,675
Kang, Yun Full Professor female $103,330
Sukharev, Maxim Full Professor male $103,096



TOP FIVE SALARIES

Full.Name title gender salary
Gaesser, Glenn Full Professor male $162,943
Adams, Marc Associate Professor male $120,280
Siegler, Jason Associate Professor male $115,000
Huberty, Jennifer Associate Professor female $103,650
Peterson, Daniel Assistant Professor male $ 98,500



TOP FIVE SALARIES

Full.Name title gender salary
Ohri-Vachaspati, Punam Full Professor female $165,543
Wang, Shu Full Professor male $160,000
Banks, Dorothy Full Professor female $140,000
Bruening, Meredith Associate Professor female $120,280
Vega-Lopez, Sonia Associate Professor female $113,460



TOP FIVE SALARIES

Full.Name title gender salary
Yost, William Researcher male $189,888
Scherer, Nancy Full Professor female $156,634
Gray, Shelley Full Professor female $147,400
Berisha, Visar Associate Professor uncoded $118,400
Schatzki, MariaRita Teaching Faculty uncoded $106,308



TOP FIVE SALARIES

Full.Name title gender salary
Bodansky, Daniel Full Professor male $274,000
Banks, Angela Full Professor female $255,250
Roberts, Lawrence Teaching Faculty male $250,000
Selmi, Michael Full Professor male $225,000
Saks, Michael Full Professor male $222,549



TOP FIVE SALARIES

Full.Name title gender salary
Bate, Andrew Full Professor male $250,000
Diaz, Natalie Associate Professor female $210,200
Justice, George Full Professor male $186,000
Bjork, Robert Full Professor male $163,750
Looser, Devoney Full Professor female $160,387



TOP FIVE SALARIES

Full.Name title gender salary
Lederman, Linda Full Professor female $220,000
Tracy, Sarah Full Professor female $135,670
Corman, Steven Full Professor male $130,500
Alberts, Janet Full Professor female $129,300
Roberto, Anthony Full Professor male $119,450



TOP FIVE SALARIES

Full.Name title gender salary
Matustik, Martin Full Professor male $138,300
Brashears, William Teaching Faculty male $116,400
Pagan, Eduardo Associate Professor male $114,900
Lerman, Richard Full Professor male $106,390
Hanlon, Christopher Full Professor male $105,275



TOP FIVE SALARIES

Full.Name title gender salary
Misner, John Teaching Faculty male $196,223
Beelman, Maud Teaching Faculty female $185,000
Cohen, Sarah Full Professor female $157,579
Wallace, Julia Teaching Faculty female $156,259
Downie, Leonard Teaching Faculty male $155,448



TOP FIVE SALARIES

Full.Name title gender salary
Akpan, Patience Associate Professor female $89,000
Bates, Denise Assistant Professor female $73,429
Giron, Angela Teaching Faculty female $71,722
Castillo, Elizabeth Assistant Professor female $70,749
Trinh, Mai Assistant Professor female $70,740



TOP FIVE SALARIES

Full.Name title gender salary
Dietrich, Suzanne Full Professor female $127,995
Camacho, Erika Full Professor female $121,440
Kanthaswamy, Sreetharan Full Professor uncoded $117,645
Sullivan, Brian Full Professor male $111,420
Marshall, Pamela Full Professor female $107,234



TOP FIVE SALARIES

Full.Name title gender salary
Marshall, Kimberly Full Professor female $121,288
Roumain, Daniel Teaching Faculty male $121,185
Spring, Robert Full Professor male $115,305
Meyer, Jeffery Associate Professor male $112,325
DeMaris, Brian Associate Professor male $109,184



TOP FIVE SALARIES

Full.Name title gender salary
Ritchie, Barry Full Professor male $233,201
Nemanich, Robert Full Professor male $210,580
Smith, David Full Professor male $184,222
Spence, John Full Professor male $184,200
Liu, Jingyue Full Professor uncoded $180,825



TOP FIVE SALARIES

Full.Name title gender salary
McNamara, Danielle Full Professor female $227,000
Chassin, Laurie Full Professor female $226,418
Eisenberg, Nancy Full Professor female $200,336
Mackinnon, David Full Professor male $177,750
Kenrick, Douglas Full Professor male $176,765



TOP FIVE SALARIES

Full.Name title gender salary
Kleim, Jeffrey Associate Professor male $159,301
Tyler, William Associate Professor male $148,600
Lockhart, Thurmon Full Professor male $135,000
Stabenfeldt, Sarah Associate Professor female $125,833
Sadleir, Rosalind Associate Professor female $124,428



TOP FIVE SALARIES

Full.Name title gender salary
Panchanathan, Sethuraman Full Professor uncoded $365,000
VanLehn, Kurt Full Professor male $240,565
Kambhampati, Subbarao Full Professor uncoded $224,719
Liu, Huan Full Professor male $211,536
Mirchandani, Pitu Full Professor uncoded $206,710



TOP FIVE SALARIES

Full.Name title gender salary
Vittal, Vijay Full Professor male $298,000
Lai, Ying-Cheng Full Professor uncoded $270,200
Kiaei, Sayfe Full Professor uncoded $264,880
Meldrum, Deirdre Full Professor female $235,250
Balanis, Constantine Full Professor male $221,879



TOP FIVE SALARIES

Full.Name title gender salary
Adrian, Ronald Full Professor male $302,352
Chattopadhyay, Aditi Full Professor female $292,157
Dahm, Werner Full Professor male $248,748
Lin, Jerry Full Professor male $218,200
Friesen, Cody Associate Professor male $202,250



TOP FIVE SALARIES

Full.Name title gender salary
Cook-Deegan, Robert Full Professor male $204,480
Barab, Sasha Full Professor female $199,896
Michael, Katina Full Professor female $179,725
Martin, Paul Researcher male $169,538
Mayes, Kristin Teaching Faculty female $162,742



TOP FIVE SALARIES

Full.Name title gender salary
Kavazanjian, Edward Full Professor male $260,500
Westerhoff, Paul Full Professor male $255,300
Hjelmstad, Keith Full Professor male $253,100
Allenby, Braden Full Professor male $243,400
Lackner, Klaus Full Professor male $228,900



TOP FIVE SALARIES

Full.Name title gender salary
Klett, Mark Full Professor male $146,336
Weiser, Kurt Full Professor male $140,243
Jenik, Adriene Full Professor female $125,174
Lawson, Shawn Associate Professor male $118,000
Codell, Julie Full Professor female $113,462



TOP FIVE SALARIES

Full.Name title gender salary
Spohn, Cassia Full Professor female $226,000
White, Michael Full Professor male $173,538
Maguire, Edward Full Professor male $163,500
Hepburn, John Full Professor male $143,213
Reisig, Michael Full Professor male $142,300



TOP FIVE SALARIES

Full.Name title gender salary
Bell, James Full Professor male $222,400
Christensen, Philip Full Professor male $216,050
Windhorst, Rogier Full Professor uncoded $189,950
Anbar, Ariel Full Professor female $189,800
Timmes, Francis Full Professor male $188,705



TOP FIVE SALARIES

Full.Name title gender salary
Fotheringham, Stewart Full Professor male $333,200
Turner, Billie Full Professor female $221,647
Sailor, David Full Professor male $141,453
Cerveny, Randall Full Professor male $132,462
Dorn, Ronald Full Professor male $124,288



TOP FIVE SALARIES

Full.Name title gender salary
Mahalov, Alex Full Professor male $224,020
McCulloch, Robert Full Professor male $212,170
Renaut, Rosemary Full Professor female $174,005
Gumel, Abba Full Professor male $167,945
Carlson, Marilyn Full Professor female $164,207



TOP FIVE SALARIES

Full.Name title gender salary
Navrotsky, Alexandra Full Professor female $358,209
Fromme, Petra Full Professor female $226,197
Buttry, Daniel Full Professor male $192,925
Angell, Charles Full Professor male $191,976
Moore, Thomas Full Professor male $184,096



TOP FIVE SALARIES

Full.Name title gender salary
Hero, Rodney Full Professor male $341,750
Polt, Michael Teaching Faculty male $226,600
Bergen, Peter Teaching Faculty male $196,875
Thies, Cameron Full Professor male $175,000
Hechter, Michael Full Professor male $171,750



TOP FIVE SALARIES

Full.Name title gender salary
Bozeman, Barry Full Professor male $236,900
Kapstein, Ethan Full Professor male $227,500
Reilly, Thomas Full Professor male $186,375
Corley, Elizabeth Full Professor female $150,070
Feeney, Mary Full Professor female $144,000



TOP FIVE SALARIES

Full.Name title gender salary
Brayboy, Bryan Full Professor male $219,429
Scott, Kimberly Full Professor female $180,000
Lomawaima, K Full Professor uncoded $161,685
Swadener, Elizabeth Full Professor female $151,478
Moore, Elsie Full Professor female $148,250



TOP FIVE SALARIES

Full.Name title gender salary
Messing, Jill Full Professor female $160,000
Shafer, Michael Full Professor male $137,401
Ashford, Jose Full Professor male $131,845
Segal, Elizabeth Full Professor female $130,390
Lecroy, Craig Full Professor male $129,970



TOP FIVE SALARIES

Full.Name title gender salary
Fixico, Donald Full Professor male $271,527
Austin, Curtis Associate Professor male $190,000
Alexander, Leslie Associate Professor female $190,000
Saikia, Yasmin Full Professor female $181,750
Critchlow, Donald Full Professor male $158,446



TOP FIVE SALARIES

Full.Name title gender salary
Nanez, Jose Full Professor male $151,212
Mickelson, Kristin Full Professor female $125,464
Kassing, Jeffrey Full Professor male $118,412
Kirby, Andrew Full Professor male $117,816
Nadesan, Majia Full Professor uncoded $114,104



TOP FIVE SALARIES

Full.Name title gender salary
Sala, Osvaldo Full Professor male $291,567
Grimm, Nancy Full Professor female $253,500
Compton, Carolyn Full Professor female $241,600
Jacobs, Bertram Full Professor male $202,800
Perrings, Charles Full Professor male $188,538



TOP FIVE SALARIES

Full.Name title gender salary
Pfirman, Stephanie Full Professor female $255,000
Melnick, Robert Researcher male $249,765
Basile, George Teaching Faculty male $168,913
Childers, Daniel Full Professor male $145,466
Aggarwal, Rimjhim Associate Professor uncoded $143,500



TOP FIVE SALARIES

Full.Name title gender salary
Jackson, Maria Full Professor female $142,011
Underhill, Michael Full Professor male $135,995
Brooks, Kenneth Full Professor male $133,800
Petrucci, Darren Full Professor male $132,762
Rotondi, Michael Full Professor male $129,528



TOP FIVE SALARIES

Full.Name title gender salary
Elliott, Stephen Full Professor male $281,860
Sandefur, Rebecca Full Professor female $220,000
Fabes, Richard Full Professor male $190,000
Meek, Shantel Teaching Faculty female $175,097
Ladd, Gary Full Professor male $165,726



TOP FIVE SALARIES

Full.Name title gender salary
Lamoreaux, Phillip Associate Professor male $323,113
Li, Yinghua Full Professor uncoded $322,573
Matejka, Michal Full Professor female $309,350
Reckers, Philip Full Professor male $300,975
Kaplan, Steven Full Professor male $297,109



TOP FIVE SALARIES

Full.Name title gender salary
Prescott, Edward Full Professor male $436,101
Manelli, Alejandro Full Professor male $320,449
Silverman, Daniel Full Professor male $310,840
Chade, Hector Full Professor male $302,410
Mehra, Rajnish Full Professor uncoded $296,743



TOP FIVE SALARIES

Full.Name title gender salary
Chen, Pei-yu Full Professor uncoded $230,917
Zhang, Zhongju Full Professor uncoded $224,029
Shao, Benjamin Full Professor male $209,807
Shi, Zhan Associate Professor uncoded $200,867
Han, Sang Pil Associate Professor male $195,019



TOP FIVE SALARIES

Full.Name title gender salary
LePine, Jeffery Full Professor male $402,257
Gomez-Mejia, Luis Full Professor male $361,393
Ashforth, Blake Full Professor male $338,580
Corley, Kevin Full Professor male $282,000
Semadeni, Matthew Full Professor male $273,267



TOP FIVE SALARIES

Full.Name title gender salary
Choi, Thomas Full Professor male $288,818
Carter, Craig Full Professor male $263,000
Fowler, John Full Professor male $256,139
Rabinovich, Elliot Full Professor male $252,685
Li, Hongmin Full Professor uncoded $250,000